import pinia from './piniaIndex.js'

// 创建一个vuex兼容模式的store，方便request.js使用
const state = {
  user: {
    token: uni.getStorageSync('token') || '',
    userInfo: uni.getStorageSync('userInfo') || null
  },
  bloodSugar: {
    records: uni.getStorageSync('bloodSugarRecords') || []
  }
}

export default {
  pinia,
  state
} 